<template>
  <image @click="eventClick" class="vc hicon" :class="className" :src="url" :mode="mode"></image>
</template>

<script>
export default {
  props: {
    src: {
      type: String,
      required: true
    },
    className: {
      type: String,
      default: ''
    },
    mode: {
      type: String,
      default: 'aspectFit'
    },
    type: {
      type: String,
      default: 'png'
    }
  },
  computed: {
    url() {
      return require(`../static/${this.src}@2x.${this.type}`)
    }
  },
	options: { styleIsolation: 'shared' },
  methods: {
    eventClick(){
      this.$emit('eventClick');
    }
  }
}
</script>
